package com.example.jvm.jvm03.lesson23;

import lombok.extern.slf4j.Slf4j;

/**
 * @Description
 * @Date 2021/7/13
 * @Created by Jonathan
 */
@Slf4j
public class GCTest {
    private static final int _1MB = 1024 * 1024;

    /**
      -Xms30M
      -Xmx30M
      -XX:+PrintGCDetails
      -XX:+PrintHeapAtGC
     */

    public static void main(String[] args) {
        byte[] allocation1, allocation2, allocation3, allocation4;
        allocation1 = new byte[2 * _1MB];
        System.out.println("创建2M后");
        allocation2 = new byte[2 * _1MB];
        System.out.println("创建2M后");
        allocation3 = new byte[2 * _1MB];
        System.out.println("创建2M后");
        //allocation4 = new byte[2 * _1MB];
        //log.info("创建2M后");
    }
}
